import java.util.*;
/*
public class ListNode {
    int val;
    ListNode next = null;

    ListNode(int val) {
        this.val = val;
    }
}*/
public class Solution {
    public ListNode FindKthToTail(ListNode head,int k) {
        
        if(k<=0||head == null) {
            return null;
        }
        ListNode fast = head;
        ListNode slow = head;
        int count = k-1;
        while(count>0) {
            fast = fast.next;
            if(fast == null) {
                return null;
            }
            count--;
        }
        while(fast.next!=null) {
            slow = slow.next;
            fast = fast.next;
        }
        return slow;
    }
}